package com.project.service.impl;

import com.project.bean.EmployeeBean;
import com.project.dao.IEmployeeDao;
import com.project.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * @Title: EmployeeServiceImpl
 * @Package: com.project.bean
 * @Description:
 * @Author: Liang-Xie
 * @Date: 2022/6/30 - 11:24
 */
@SuppressWarnings("all")
@Service
public class EmployeeServiceImpl implements IEmployeeService {
    @Autowired
    private IEmployeeDao dao;

    @Override
    public List<EmployeeBean> findAll() {
        return dao.findAll();
    }

    @Override
    public void add(EmployeeBean employee) {
        dao.add(employee);
    }

    @Override
    public void update(Integer id, Integer money) {
        dao.update(id, money);
    }

    @Override
    public EmployeeBean findById(Integer id) {
        return dao.findById(id);
    }

    @Override
    public void dismission(Integer id) {
        dao.dismission(id, "离职");
    }
}
